<template>
  <div class="">
    <div class="common-list" v-for="(item,index) in listData" :key="index">
      <div class="title">
        <div class="left">
          <div class="title-pic"><img :src="item.head_pic" alt=""></div>
          <span>{{item.writer}}</span>
        </div>
        <div class="right">
          <i class="iconfont">&#xe60a;</i>
          <a href="#">{{item.label}}</a>
        </div>
      </div>

      <div class="poster" @click="toListenDetails">
        <img :src="item.img" alt="">
        <p>{{item.title}}</p>
      </div>

      <div class="foot">
        <span> <i class="iconfont">&#xe634;</i> {{item.like}} </span>
        <span> <i class="iconfont">&#xe630;</i> {{item.message}} </span>
      </div>

    </div>
  </div>

</template>

<script>
export default {
  name: 'CommonList',
  data(){
    return{

    }
  },
  props:{
    listData:{
      type:Array,
      default:function(){
        return []
      }
    }
  },
  methods:{
    toListenDetails(event){
      this.$router.push("ListenDetails")
    }
  }
}
</script>

<style lang="css" scoped>
.common-list{
  width: 90%;
  margin: 0.1rem auto;
  background: #fff;
}
.title{
  width: 100%;
  font-size: 17px;
  padding: 0.1rem;
  border-bottom: 1px solid #f1f1f1;
}
.title-pic{
  width: .4rem;
  height: .4rem;
  display: inline-block;
}
.left{
  color: grey;
  flex: 1;
  display: inline-block;
}
.right{
  display: inline-block;
  float: right;
  color: #109d59;
  margin-right: .2rem;
  margin-top: .1rem;
}
.right i{

}
.right a{
  display: inline-block;
  padding: .04rem .09rem;
  border: 1px solid #109d59;
  border-radius: .4rem;
  font-size: 12px;
}
.poster{
  font-size: 16px;
  border-bottom: 1px solid #f1f1f1;
}
.poster img{
  width: 6rem;
  height: 2rem;
}
.poster p{
  padding: .1rem;

}
.foot{
  font-size: 13px;
  padding: .1rem;
}
</style>
